<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


Route::get('/', 'Login\LoginController@login');
Route::post("/do_login",'Login\LoginController@doLogin');                                   //   登陆
Route::post("/do_register",'Login\RegisterController@doRegister');                                   //   注册
Route::get('/validateCode','ValidateCode\ValidateCodeController@doimg'); 			        // 验证码
Route::get('/getSmsCode','Code\CodeController@getSmsCode'); 			        // 验证码
Route::get('/logout', 'Login\LoginController@logout');                  //退出登录

Route::group(['middleware' => ['Login']], function () {

    //页面
    Route::get('/home', 'Index\IndexController@home');
    Route::get('/bussit', 'Index\IndexController@index');
    Route::get('/header', 'Index\IndexController@header');
    Route::get('/left_nav', 'Index\IndexController@leftNav');
    Route::get('/useman', 'User\IndexController@index');
    Route::get('/disman', 'Agent\AgentController@disman');
    Route::get('/recharge', 'Recharge\IndexController@recharge');
    Route::get('/accman', 'Admin\IndexController@accman');
    Route::get('/operation_log', 'User\IndexController@roleSet');
    Route::get('/set_meal_price', 'Product\IndexController@index');



    Route::get("/getSerialNumber",'User\IndexController@getSerialNumber');                                   //   流水号

    /******************  首页  *******************/
    Route::get("/getIndexInfo",'Index\IndexController@getIndexInfo');                                   //   首页信息
    Route::get("/getUserInfo",'User\IndexController@getUserInfo');                                   //   首页信息
    Route::get("/getAreaList",'Index\IndexController@getAreaList');                                   //   地区列表
    Route::get("/getExpiredList",'Index\IndexController@getExpiredList');                                   //   即将到期列表
    Route::get("/getNoBalanceList",'Index\IndexController@getNoBalanceList');                                   //   余额不足列表
    Route::post("/QuickOpenTestAccount",'User\IndexController@QuickOpenTestAccount');                                   //   快捷创建测试账户
    Route::post("/QuickOpenPayAccount",'User\IndexController@QuickOpenPayAccount');                                     //   快捷创建付费账户

    /******************** 用户 *********************/

    Route::get("/getUserAccountList",'User\IndexController@getUserAccountListData');                                   //   用户列表
    Route::post("/addUserAccount",'User\IndexController@addUserAccount');                                   //   添加用户
    Route::post("/deleteUserAccount",'User\IndexController@deleteUserAccount');                                   //   删除用户、批量删除
    Route::post("/renewUserAccount",'User\IndexController@renewUserAccount');                                   //   续费用户
    Route::post("/updateUserAccount",'User\IndexController@updateUserAccount');                                   //   编辑用户

    Route::post("/batchAddUserAccount",'Batch\BatchController@batchAddUserAccount');                                   //   批量添加用户
    Route::post("/batchRenewUserAccount",'Batch\BatchController@batchRenewUserAccount');                                   //   批量续费用户

    /***********************代理************************/
    Route::get("/getAgentList",'Agent\AgentController@getFirstAgentList');                                   //   一级代理列表
    Route::get("/getSecAgentList",'Agent\AgentController@getSecAgentList');                                   //   二级代理列表
    Route::get("/getInviteCode",'Agent\AgentController@getFcode');
    Route::post("/addAgentAccount",'Agent\AgentController@addAgentAccount');                                   //   添加代理
    Route::post("/deleteAgentAccount",'Agent\AgentController@deleteAgentAccount');                                   //   删除代理
    Route::post("/updateAgentAccount",'Agent\AgentController@updateAgentAccount');                                   //   编辑代理
    Route::post("/rechargeAgentAccount",'Agent\AgentController@rechargeAgentAccount');                                   //   代理充值

    /*************************套餐价格*************************/
    Route::get("/getProductList",'Product\IndexController@getProductList');                                   //   套餐列表
    Route::post("/addProduct",'Product\IndexController@addProduct');                                   //   套餐列表
    Route::post("/deletelProduct",'Product\IndexController@deletelProduct');                                   //   套餐列表
    Route::post("/updateProduct",'Product\IndexController@updateProduct');                                   //   套餐列表


    /************************充值*************************/

    Route::get('/wxrecharge', 'Recharge\IndexController@WxRecharge');                                                   //   微信充值
    Route::post('/alirecharge', 'Recharge\IndexController@AliRecharge');                                                //   支付宝充值
    Route::post('/checkrechargestatus', 'Recharge\IndexController@CheckRechargeStatus');                                //   检测微信支付订单状态

    /************************账号管理*************************/
    Route::get("/getAdminList",'Admin\IndexController@getAdminList');                                   //   一级代理列表
    Route::post("/addAdminAccount",'Admin\IndexController@addAdminAccount');                                   //   添加代理
    Route::post("/delAdminAccount",'Admin\IndexController@deleteAdminAccount');                                   //   删除代理
    Route::post("/updateAdminAccount",'Admin\IndexController@updateAdminAccount');                                   //   编辑代理
    Route::get("/getOpLogList",'Admin\IndexController@getOpLogList');                                   //   编辑代理

});
